package cn.t.repository.order;

import cn.t.core.repoistory.impl.IRepository;
import cn.t.dto.order.QuotationQueryRequest;
import cn.t.model.order.OrderDetailDO;

import java.util.Date;
import java.util.List;

/**
 * 领料订单明细表(OrderDetail)领域仓库
 *
 * @author t
 * @since 2024-05-24 10:19:12
 */
public interface OrderDetailRepository extends IRepository<OrderDetailDO> {

    Boolean addOrUpdateBatch(List<OrderDetailDO> orderDetailDOList);


    Boolean updateModel(OrderDetailDO orderDetailDO,List<Long> ids);

    List<OrderDetailDO> queryOrderDetailList(QuotationQueryRequest detaiDo,List<String> orderSnList, int start, Integer pageSize, String field, String direction);
    Long queryOrderDetailCount(QuotationQueryRequest detailDo, List<String> orderSnList);

    /**
     * 获取用户在公司下的by sku的订单详情
     * @param userId
     * @param firmId
     * @param skuCodes
     * @param timeStart
     * @return
     */
     List<OrderDetailDO> queryDetailByUserFirm(Long userId, Long firmId, List<String> skuCodes, Date timeStart);
}